//
//  NISelectView.h
//  NewIdeasAPI_Base
//  选择下拉框,或上拉框
//  Created by 　罗若文 on 16/9/8.
//  Copyright © 2016年 罗若文. All rights reserved.
//

#import <UIKit/UIKit.h>

#pragma mark - 类型定义
typedef NS_ENUM(NSInteger, NISelectStyle) {
    ///向下
    NISelectStyleAdown,
    ///向上
    NISelectStyleUpward
};

///回调
typedef void (^NISelectViewBlock)(id selectView);

@interface NISelectView : UIView

///选项视图列表
@property (nonatomic,strong) NSArray * itemViewList;
///被选中的下标
@property (nonatomic) int selected;
///选项视图方向,默认向下
@property (nonatomic) NISelectStyle selectStyle;

///初始化视图(起始位置和宽度高度,样式)
- (instancetype)initWithFrame:(CGRect)frame plistStyleKey:(id)plistStyleKey;

///初始化视图(起始位置和宽度高度,待选项视图,样式)
- (instancetype)initWithFrame:(CGRect)frame itemViewList:(NSArray *)itemViewList plistStyleKey:(id)plistStyleKey;

///初始化视图(起始位置和宽度高度,待选项视图,样式,方向)
- (instancetype)initWithFrame:(CGRect)frame itemViewList:(NSArray *)itemViewList plistStyleKey:(id)plistStyleKey SelectStyle:(NISelectStyle)SelectStyle;

///主动选择
-(void)selectIndex:(int)index;

///刷新选项列表
-(void)reloadItemViewList:(NSArray *)itemViewList;

///显示选项
-(void)show_block:(NISelectViewBlock)block;

///关闭选项
-(void)close;

@end
